﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace intelliSys.Management.Automation.Test.Interop
{
    public static class OpenXMLInteropHelper
    {
        public static string Delimiter = "/*_intelliSysManagementAutomation_*/";
        public static string Concat(string OpenXML, string PlainText)
        {
            return string.Format("{0}{1}{2}", OpenXML, Delimiter, PlainText);
        }
        public static void GetOpenParts(string composite, out string OpenXMLPart, out string PlainTextPart)
        {
            var idx = composite.LastIndexOf(Delimiter);
            OpenXMLPart = composite.Substring(0, idx);
            PlainTextPart = composite.Substring(idx + Delimiter.Length, composite.Length - 1 - idx - Delimiter.Length);
        }
    }
}
